import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;

public class ConvertStreamDemo02 {
    public static void main(String[] args) throws IOException {

        FileWriter fw = new FileWriter("MyFile\\src\\tmp\\frtest.txt");
        FileReader fr = new FileReader("MyFile\\src\\tmp\\frtest.txt");
        fw.write("html\n");
        fw.write("is\n");
        fw.write("very easy !\n");
        fw.close();

        char[] chs = new char[1024];
        int len;

        while((len = fr.read(chs)) != -1){

            System.out.println(new String(chs,0,len));

        }

        fr.close();
    }
}
